﻿using EzPos.Utility;

namespace EzPos.Model.Table
{
    public class Table
    {
        public const string ConstTableId = "TableId";
        public const string ConstTableName = "TableName";

        public int TableId { get; set; }

        public int StatusId { get; set; }

        public string TableName { get; set; }

        public int SaleOrderId { get; set; }

        public string BusyStatus
        {
            get
            {
                return StatusId == 0 ? "ទំនេរ" : "រវល់";
            }
        }
        public string SaleOrderNumber
        {
            get
            {
                if (SaleOrderId == 0)
                    return string.Empty;

                return
                    "S-" +
                    StringHelper.Right("000000" + SaleOrderId, 6);
            }
        }
    }
}